package com.qlk.vorder.schedule.service.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.qlk.schedule.core.BusinessService;
import com.qlk.schedule.domain.Task;
import com.qlk.vorder.service.OrdersService;

/**
 * 創建退款单任务
 * 
 * @author js
 * 
 */
@Service("createRefundTaskService")
public class CreateRefundTaskService implements BusinessService<Task>{

	private static final Logger LOGGER = LoggerFactory.getLogger(CreateRefundTaskService.class);

	@Autowired
	private OrdersService ordersService;

  	public boolean executeSingleTask(final Task task, final String ownSign) throws Exception {
		boolean flag = false;
		LOGGER.info("createRefundTaskService do something: id" + task.getTaskId() + "keyWord1:" + task.getKeyword1());
		flag = ordersService.createRefundTask(task.getKeyword1());
		return flag;
	}
}
